{% extends "base_por1admin.html" %}

{% load jrc_shared %}

{% block mainheading %}{{ block.super }} \ Archive performance{% endblock %}

{% block content %}

    <table border="1">
        <thead>
            <th>Year</th>
            <th>Month</th>
            <th>Perf. (unlev. %)</th>
            <th>Year perf.<br />(unlev. %)</th>
            <th>Sum (unlev. %)</th>
            <th>Max perf.<br />(unlev. %)</th>
            <th>Drawdown (unlev. %)</th>
            <th>Max DD (unlev. %)</th>
            <th>Perf. (lev., %)</th>
            <th>Year perf.<br />(lev., %)</th>
            <th>Sum (lev. %)</th>
            <th>Max DD (lev. %)</th>
        </thead>
        <tbody>
        
            {% for p in performances_iterator %}
                <tr class="{% cycle "row1" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" "row2" %}">
                    {% if p.month == 1 %}
                        <td><strong>{{ p.year }}</strong></td>
                    {% else %}
                        <td>&nbsp;</td>
                    {% endif %}
                    <td>{{ p.month_short }}</td>
                    <td>{{ p.value|jrc_intformat }}</td>
                    {% if p.month == 12 %}
                        <td><strong>{{ p.unleverage_performance_for_year|jrc_intformat }}</strong></td>
                    {% else %}
                        <td>&nbsp;</td>
                    {% endif %}
                    <td>{{ p.unleverage_pct_sum|jrc_intformat }}</td>
                    <td>{{ p.max_unleverage_pct|jrc_intformat }}</td>
                    <td>{{ p.unleverage_drawdown|jrc_intformat }}</td>
                    <td>&nbsp;</td>
                    <td>{{ p.leverage_performance_pct|jrc_intformat }}</td>
                    {% if p.month == 12 %}
                        <td><strong>{{ p.leverage_performance_for_year|jrc_intformat }}</strong></td>
                    {% else %}
                        <td>&nbsp;</td>
                    {% endif %}
                    <td>{{ p.leverage_performance_pct_sum|jrc_intformat }}</td>
                    <td>&nbsp;</td>
                </tr>
            {% endfor %}

        </tbody>
    </table>

{% endblock %}
